window.onload=function (){
    let date=new Date()
    let week=""
    switch (date.getDay())
    {
        case 0:week="天";break;
        case 1:week="一";break;
        case 2:week="二";break;
        case 3:week="三";break;
        case 4:week="四";break;
        case 5:week="五";break;
        case 6:week="六";break;
    }
    document.write("今天的日期是: "+date.getFullYear()+"年"+date.getMonth()+"月"+date.getDate()+"日"+" 星期"+week+
                    " 现在时间是: "+date.getHours()+"时"+date.getMinutes()+"分"+date.getSeconds()+"秒")
}